#ifndef _C_MOUSE_H_
#define _C_MOUSE_H_

enum e_Mouse_Buttons
{
  e_Left,
  e_Center,
  e_Right
};

class C_Mouse
{
protected:
  int m_CurrX;
  int m_CurrY;
  int m_PrevX;
  int m_PrevY;
  bool m_Pressed[3];

public:
	C_Mouse()
	{
		Null();
	}

	void Null()
	{
		m_PrevX = 0;
		m_PrevY = 0;
		m_CurrX = 0;
		m_CurrY = 0;
		m_Pressed[e_Left] = false;
		m_Pressed[e_Center] = false;
		m_Pressed[e_Right] = false;
	}

	void Update(int x, int y, int button, bool b)
	{

		m_PrevX = m_CurrX;
		m_PrevY = m_CurrY;
		m_CurrX = x;
		m_CurrY = y;
		m_Pressed[button] = b;
	}

	void Update(int x, int y)
	{
		m_PrevX = m_CurrX;
		m_PrevY = m_CurrY;
		m_CurrX = x;
		m_CurrY = y;
	}

	bool Pressed(int ib) 	{	return m_Pressed[ib];	}

	int currX() {return m_CurrX; }
	int currY() {return m_CurrY; }
	int prevX() {return m_PrevX; }
	int prevY() {return m_PrevY; }
};

#endif // _C_MOUSE_H_